#pragma once

#include <map>
#include <thread>
#include <mutex>

class CAppInstance
{
public:
	static CAppInstance * GetInstance();

private:
	static CAppInstance * s_AppInstance;

public:
	CAppInstance();

	virtual ~CAppInstance();

public:
	void SetArgument(int argc, char * argv[]);
	
	int GetArgumentCount();
	
	char ** GetArgumentVector();

	void SetThreadPrivateData(void * privateData);

	void * GetThreadPrivateData();

protected:
	int m_AppArgc;

	char ** m_AppArgv;

	std::mutex m_ThreadPrivateDataLock;

	std::map<std::thread::id, void*>  m_ThreadPrivateDataTable;
};